package com.hyt.it.ogt.ks.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import com.hyt.common.apiInfor.ApiResponse;
import com.hyt.it.ogt.ks.feign.hystrix.TpsClientHystrix;
import com.hyt.model.tps.vo.Bucket;

/**
 *
 * @author 刘恒活
 */
@FeignClient(name="it-ogt-tps", fallback = TpsClientHystrix.class)
public interface TpsClient {

    /**
     * 通过机构id查机构名称
     * @param officeId
     * @return
     */
    @GetMapping(value = "/wx/request/getQRCode")
    String getQRCode(@RequestParam String officeId, @RequestParam String scene,
                     @RequestParam(required = false) String page, @RequestParam(required = false) Integer width);

    /**
     * 获取微信配置信息
     * @param officeId
     * @return
     */
    @GetMapping(value = "/wx/request/getWxConfig")
    String getWxConfig(@RequestParam(required = false) String officeId);

    @GetMapping(value = "/bucket/getBucketTempCredential")
    String getBucketTempCredential(@RequestParam(required = false) String officeId);

    @GetMapping(value = "/wx/request/wxLogin")
    String wxLogin(String jsCode);
    
    /**
     * 获取测评报告
     * @param requestUrl
     * @param json
     * @return
     */
    @PostMapping(value = "/xy/Supplier/getXyEvalResult")
    String getXyEvalResult(@RequestParam String requestUrl, @RequestBody String json);
    
    /**
     * 获取大易token
     * @param requestUrl
     * @param json
     * @return
     */
    @PostMapping(value = "/xy/Supplier/getDayiToken")
    String getDayiToken(@RequestParam String requestUrl, @RequestBody String json);
    
    /**
     * 成绩推送大易
     * @param requestUrl
     * @param json
     * @param token
     * @return
     */
    @PostMapping(value = "/xy/Supplier/sendScoreToDayi")
    String sendScoreToDayi(@RequestParam String requestUrl, @RequestBody String json, @RequestParam String token);
      
    /**
     * 获取近屿token
     * @param requestUrl
     * @param json
     * @return
     */
    @PostMapping(value = "/xy/Supplier/getJinyuToken")
    String getJinyuToken(@RequestParam String requestUrl, @RequestBody String json);
    
    /**
     * 获取近屿编程题地址
     * @param requestUrl
     * @param json
     * @return
     */
    @PostMapping(value = "/xy/Supplier/getCodingQuestionUrl")
    String getCodingQuestionUrl(@RequestParam String requestUrl, @RequestBody String json);

    @GetMapping(value = "/bucket/getHwObsCredential")
    ApiResponse<Bucket> getHwObsCredential(@RequestParam(required = false) String officeId);

    /**
     *
     * @param path
     * @param charset
     * @return
     */
    @GetMapping("/bucket/getStringFromHuaweiObs")
    String getStringFromHuaweiObs(@RequestParam String path, @RequestParam String charset);

    /**
     * 人脸核身参数
     * @param idCard
     * @param name
     * @return
     */
    @GetMapping("/face/request/getFaceApp")
    String getFaceApp(@RequestParam String idCard, @RequestParam String name);

}
